package com.aizuda.boot.modules.business.template.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("contract_template_field")
@Schema(description= "合同模板字段实体")
public class ContractTemplateFieldEntity {

    @TableId(type = IdType.ASSIGN_ID)
    @Schema (description ="主键ID")
    private Long id;

    @Schema (description ="字段编码，格式为ext1、ext2等")
    private String fieldCode;

    @Schema (description ="所属合同模板ID")
    private Integer templateId;

    @Schema (description ="字段名称")
    private String fieldName;

    @Schema (description ="字段类型（文本、数字、日期、下拉框、金额等）")
    private String fieldType;

    @Schema (description ="是否为默认字段")
    private Boolean isDefaultField;

    @Schema (description ="是否必填")
    private Boolean isRequired;

    @Schema (description ="是否支持对方填写")
    private Boolean allowCounterpartyFill;

    @Schema (description ="字段说明")
    private String fieldDescription;

    @Schema (description ="默认值")
    private String defaultValue;

    @Schema (description ="字段显示条件（JSON）")
    private String displayConditions;

    @Schema (description ="字段使用次数")
    private Integer usageCount;

    @Schema (description ="排序顺序")
    private Integer sortOrder;

    @Schema (description ="创建时间")
    private Timestamp createdAt;

    @Schema (description ="更新时间")
    private Timestamp updatedAt;
}
